<?php
//显示单个用户
require_once('../config.php');

$id = $_POST['id'];

$result = $link->query("SELECT * FROM `employees` where id = '{$id}'");
if($result){
    $resp['status'] = 'success';
    $resp['data'] = $result->fetch_assoc();
}else{
    $resp['status'] = 'success';
    $resp['error'] = 'An error occured while fetching the data. Error: '.$link->error;
}
echo json_encode($resp);

?>
